import type { App } from 'vue'
import { setupGlobCom } from './components'
import { isDependencyInstalled, validateDependencies } from './utils/dependency-check'

// 只导入自定义样式，不包含Element Plus样式
import "./styles/index.scss"

// Export all components
export * from './components'

// Export hooks
export * from './hooks/web/useCache'
export * from './hooks/web/useConfigGlobal'
export * from './hooks/web/useCrudSchemas'
export * from './hooks/web/useDesign'
export * from './hooks/web/useEmitt'
export * from './hooks/web/useForm'
export * from './hooks/web/useGuide'
export * from './hooks/web/useI18n'
export * from './hooks/web/useIcon'
export * from './hooks/web/useLocale'
export * from './hooks/web/useMessage'
export * from './hooks/web/useNetwork'
export * from './hooks/web/useNow'
export * from './hooks/web/useNProgress'
export * from './hooks/web/usePageLoading'
export * from './hooks/web/useTable'
export * from './hooks/web/useTimeAgo'
export * from './hooks/web/useTitle'
export * from './hooks/web/useValidator'
export * from './hooks/web/useWatermark'
export * from './hooks/event/useScrollTo'

// Export types
export * from './components/eAdvancedFilter'
export * from './components/eCustomTable'

// Export utils
export * from './utils/auth'
export * from './utils/color'
export * from './utils/common'
export * from './utils/constants'
export * from './utils/dateUtil'
export * from './utils/dependency-check'
export * from './utils/dict'
export * from './utils/domUtils'
export * from './utils/download'
export * from './utils/filt'
export * from './utils/formatter'
export * from './utils/formatTime'
export * from './utils/formCreate'
export * from './utils/formRules'
export * from './utils/index'
export * from './utils/is'
export * from './utils/jsencrypt'
export * from './utils/Logger'
export * from './utils/permission'
export * from './utils/propTypes'
export * from './utils/qiankunState'
export * from './utils/routerHelper'
export * from './utils/tree'
export * from './utils/tsxHelper'

// Export types
export type * from './types/global'
export type * from './types/descriptions'

// Export component registry utilities
export { componentMapRegister, componentMapGet, componentMapHas, componentMapDel, componentMap } from './components/componentMap'

export { eConfirm } from './components/eConfirmDialog'
// Export dictionary utilities
export { setDictData, getDictOptions, getDictLabel, getDictObj, DICT_TYPE } from './utils/dict'
export type { DictDataType, NumberDictDataType } from './utils/dict'

// Export locale constants
export const SUPPORTED_LOCALES: LocaleType[] = ['zh-CN', 'en']

// 检查依赖
validateDependencies()

/**
 * Standalone version of EPMS Element
 * This version assumes Element Plus is already registered in the application
 */
const install = (app: App<Element>) => {
  // Register components without registering Element Plus
  setupGlobCom(app)
  
  // Log information about dependencies
  console.info('[EpmsElement] Running in standalone mode - external dependencies must be registered separately')
}

export default {
  install
} 